// CanvasTexture
export function getTextCanvas1() {
  let texts = [
    {
      name: '北京',
      value: 323,
    },
    {
      name: '杭州',
      value: 121,
    },
    {
      name: '南京',
      value: 56,
    },
  ]
  var width = 512,
    height = 256
  var canvas = document.createElement('canvas')
  canvas.width = width
  canvas.height = height
  var ctx = canvas.getContext('2d')
  ctx.fillStyle = '#C3C3C3'
  ctx.fillRect(0, 0, width, height)
  ctx.font = 32 + 'px " bold'
  ctx.fillStyle = '#2891FF'
  texts.forEach((text, index) => {
    ctx.fillText(`${text.name}:${text.value}`, 10, 32 * index + 30)
  })
  return canvas
}
